import React, { Component } from 'react';
import { connect } from 'react-redux';
import Top from '../../component/top/top';
import { setRouterName } from '../../store/public/action';

class Chat extends Component{
    componentWillMount(){
        const {dispatch} = this.props;
        dispatch(setRouterName(this.props.location.pathname, this.props.history));
    }


    render(){
        return(
            <div>
                <Top></Top>
                <iframe src="http://p.qiao.baidu.com/cps/chat?siteId=11670398&userId=25091484" frameborder='0' width='100%' height='600px'></iframe>
            </div>
        )
    }

}

const mapStateToProps = (state) =>{
    let routehistory = state.publics.routehistory;
    let titleName = '';

    return {
        titleName : titleName,
        Tophistory: routehistory
    }
}
export default connect(mapStateToProps)(Chat)